package top.codedance.iotp.manage.client.listenner;

import top.codedance.iotp.manage.Console;
import top.codedance.iotp.manage.client.Client;
import cd.io.netty.channel.ChannelFuture;
import cd.io.netty.channel.ChannelFutureListener;
import org.apache.log4j.Logger;

public class ConnectionListener implements ChannelFutureListener {

    private static Logger logger = Console.getLogger(ConnectionListener.class);
    private Client client;

    public ConnectionListener(Client client) {
        this.client = client;
    }

    public void operationComplete(ChannelFuture future) throws Exception {
        if (future.isSuccess() && future.channel().isActive()) {
            Console.syslogInfo("Connect the server success");
        }
    }
}
